#ifndef _SYS_FAN_FLOAT_H_
#define _SYS_FAN_FLOAT_H_

#include "FanNum.h"
#include "SysTypes.h"

#define FLOAT_VTABLE(self)   ((FanFloatVTable*)self.vtable)


extern Type*    Float_classType;
extern VTable*  Float_classVTable;


/* [sys::Float] Attributes */
struct FanFloat
{
  FanNum        super;
};


/* [sys::Float] Virtual-table */
typedef struct FanFloatVTable
{
  FanNumVTable  super;
} FanFloatVTable;


/* [sys::Float] Methods and fields */
Bool            Float_equals(Obj self, NullableObj obj);
Int             Float_compare(Obj self, Obj obj);
Int             Float_hash(Obj self);
Str*            Float_toStr(Obj self);
Float           Float_defVal(void);
Float           Float_posInf(void);
Float           Float_negInf(void);
Float           Float_nan(void);
Float           Float_e(void);
Float           Float_pi(void);
Float           Float_makeBits(Int bits);
Float           Float_makeBits32(Int bits);
NullableFloat   Float_fromStr_1(Str* s);
NullableFloat   Float_fromStr(Str* s, Bool checked);
Float           Float_random(void);
Bool            Float_approx_1(Float self, Float r);
Bool            Float_approx(Float self, Float r, NullableFloat tolerance);
Bool            Float_isNaN(Float self);
Float           Float_negate(Float self);
Float           Float_increment(Float self);
Float           Float_decrement(Float self);
Float           Float_mult(Float self, Float b);
Float           Float_multInt(Float self, Int b);
Decimal*        Float_multDecimal(Float self, Decimal* b);
Float           Float_div(Float self, Float b);
Float           Float_divInt(Float self, Int b);
Decimal*        Float_divDecimal(Float self, Decimal* b);
Float           Float_mod(Float self, Float b);
Float           Float_modInt(Float self, Int b);
Decimal*        Float_modDecimal(Float self, Decimal* b);
Float           Float_plus(Float self, Float b);
Float           Float_plusInt(Float self, Int b);
Decimal*        Float_plusDecimal(Float self, Decimal* b);
Float           Float_minus(Float self, Float b);
Float           Float_minusInt(Float self, Int b);
Decimal*        Float_minusDecimal(Float self, Decimal* b);
Float           Float_abs(Float self);
Float           Float_min(Float self, Float that);
Float           Float_max(Float self, Float that);
Float           Float_ceil(Float self);
Float           Float_floor(Float self);
Float           Float_round(Float self);
Float           Float_exp(Float self);
Float           Float_log(Float self);
Float           Float_log10(Float self);
Float           Float_pow(Float self, Float pow);
Float           Float_sqrt(Float self);
Float           Float_acos(Float self);
Float           Float_asin(Float self);
Float           Float_atan(Float self);
Float           Float_atan2(Float y, Float x);
Float           Float_cos(Float self);
Float           Float_cosh(Float self);
Float           Float_sin(Float self);
Float           Float_sinh(Float self);
Float           Float_tan(Float self);
Float           Float_tanh(Float self);
Float           Float_toDegrees(Float self);
Float           Float_toRadians(Float self);
Int             Float_bits(Float self);
Int             Float_bits32(Float self);
Str*            Float_toCode(Float self);
Str*            Float_toLocale_0(Float self);
Str*            Float_toLocale(Float self, Str* pattern);


/* [sys::Float] Type-system functions */
Type*           Float_initType(void);
VTable*         Float_initVTable(void);
void            Float_initStatic(void);


#endif
